package a3_p04_jw_kw.comparator;

import java.util.Comparator;

import a1_p04_jw_kw.struct.Node;


//compares Nodes on their "attribute" attribute
public class NodeComparator implements Comparator<Node> {

	@Override
	public int compare(Node arg0, Node arg1) {
		if (arg0.attribute == arg1.attribute) {
			return 0;
			
		} else if (arg0.attribute < arg1.attribute) {
			return -1;
			
		} else {
			return 1;
			
		}
		
	}

}
